﻿<phone:PhoneApplicationPage 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
	xmlns:local="clr-namespace:Nok_Air"
	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
	x:Class="Nok_Air.Form"
	Foreground="{StaticResource PhoneForegroundBrush}"
	Orientation="Portrait" FontFamily="/Nok Air;component/Fonts/Fonts.zip#PSL Display" FontSize="40">

	<Grid x:Name="LayoutRoot" Background="Transparent" d:DataContext="{d:DesignData /SampleData/MainViewModelSampleData.xaml}">
		<Grid.RowDefinitions>
			<RowDefinition Height="70"/>
			<RowDefinition Height="*"/>
			<RowDefinition Height="80"/>
		</Grid.RowDefinitions>
		<Grid Style="{StaticResource TopAppBarStyle}">
			<Grid.ColumnDefinitions>
				<ColumnDefinition  Width="1*"/> 		
				<ColumnDefinition  Width="2*"/> 		
				<ColumnDefinition  Width="1*"/> 		
			</Grid.ColumnDefinitions> 
			<Button x:Name="backButton" Content="Back" HorizontalAlignment="Left"  Width="130" Margin="15,0,0,0" Height="60" Style="{StaticResource BackButtonStyle}" Foreground="White" Visibility="Collapsed" />
			<TextBlock x:Name="Title_checkIn_TextBlock" Margin="0" TextWrapping="Wrap" FontSize="48" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Grid.Column="1" Visibility="Collapsed" />
            <Button x:Name="continueButton" Content="{Binding Continue}" Style="{StaticResource BlueButtonStyle}" Margin="5,0" Click="continueButton_Click" Foreground="White" VerticalAlignment="Center" Grid.Column="2" FontSize="40" />
		</Grid>
		<Grid Style="{StaticResource ContentStyle}" Margin="0">
			<ScrollViewer HorizontalAlignment="Center" Margin="10" VerticalAlignment="Center">
                <StackPanel>
                    <StackPanel HorizontalAlignment="Left" VerticalAlignment="Center">
                        <TextBlock Margin="0" TextWrapping="Wrap" Text="{Binding PassengerInfoMsg}" VerticalAlignment="Top" Foreground="Black" d:LayoutOverrides="Width" HorizontalAlignment="Left"/>
                        <TextBlock Margin="0" TextWrapping="Wrap" Text="{Binding PassengerInfoMsg2}" Foreground="#FFCC1313" VerticalAlignment="Top" d:LayoutOverrides="Width" HorizontalAlignment="Left"/>
                    </StackPanel>
                    <StackPanel>
                        <ListBox ItemsSource="{Binding PassengerItem.ADULT}" ScrollViewer.VerticalScrollBarVisibility="Disabled">
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel VerticalAlignment="Center" Width="460">
                                        <TextBlock Margin="0" TextWrapping="Wrap" Text="{Binding ContactInfoAdult}" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Black" d:DataContext="{d:DesignData /SampleData/MainViewModelSampleData.xaml}"/>
                                        <StackPanel>
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="1*"/>
                                                    <ColumnDefinition Width="2*"/>
                                                    <ColumnDefinition Width="0.2*"/>
                                                </Grid.ColumnDefinitions>
                                                <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Prefix}" Foreground="White"/>
                                                <StackPanel HorizontalAlignment="Left" VerticalAlignment="Center" Orientation="Horizontal" Grid.Column="1">
                                                    <toolkit:ListPicker  x:Name="prefix" VerticalAlignment="Center" HorizontalAlignment="Center" HorizontalContentAlignment="Center" SelectedIndex="1" Width="100" FontFamily="{StaticResource PhoneFontFamilyNormal}" Tag="{Binding title, Mode=TwoWay}" SelectionChanged="prefix_SelectionChanged">
                                                        <sys:String>Mr.</sys:String>
                                                        <sys:String>Ms.</sys:String>
                                                        <sys:String>Mrs.</sys:String>
                                                    </toolkit:ListPicker>
                                                </StackPanel>
                                            </Grid>
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="1*"/>
                                                    <ColumnDefinition Width="2*"/>
                                                    <ColumnDefinition Width="0.2*"/>
                                                </Grid.ColumnDefinitions>
                                                <TextBlock HorizontalAlignment="Left" Margin="0" TextWrapping="Wrap" Text="{Binding FirstName}" VerticalAlignment="Center" Foreground="White" d:LayoutOverrides="HorizontalAlignment"/>
                                                <TextBox Margin="0" Text="{Binding firstname, Mode=TwoWay}" TextWrapping="Wrap" VerticalAlignment="Center" Grid.Column="1" TextChanged="TextBox_TextChanged"/>
                                                <TextBlock HorizontalAlignment="Left" Margin="0" TextWrapping="Wrap" Text="*" VerticalAlignment="Center" Foreground="Red" Grid.Column="2" Visibility="{Binding firstnameIsEmpty}"/>
                                            </Grid>
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="1*"/>
                                                    <ColumnDefinition Width="2*"/>
                                                    <ColumnDefinition Width="0.2*"/>
                                                </Grid.ColumnDefinitions>
                                                <TextBlock TextWrapping="Wrap" Text="{Binding LastName}" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Left"/>
                                                <TextBox  Text="{Binding lastname, Mode=TwoWay}" TextWrapping="Wrap" VerticalAlignment="Center" Grid.Column="1" TextChanged="TextBox_TextChanged"/>
                                                <TextBlock HorizontalAlignment="Left" Margin="0" TextWrapping="Wrap" Text="*" VerticalAlignment="Center" Foreground="Red" Grid.Column="2" Visibility="{Binding lastnameIsEmpty}"/>
                                            </Grid>
                                        </StackPanel>
                                    </StackPanel>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>
                        <ListBox ItemsSource="{Binding PassengerItem.CHD}" ScrollViewer.VerticalScrollBarVisibility="Disabled">
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel VerticalAlignment="Center" Width="460">
                                        <TextBlock Margin="0" TextWrapping="Wrap" Text="{Binding ContactInfoChild}" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Black"/>
                                        <StackPanel>
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="1*"/>
                                                    <ColumnDefinition Width="2*"/>
                                                    <ColumnDefinition Width="0.2*"/>
                                                </Grid.ColumnDefinitions>
                                                <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Prefix}" Foreground="White"/>
                                                <StackPanel HorizontalAlignment="Left" VerticalAlignment="Center" Orientation="Horizontal" Grid.Column="1">
                                                    <toolkit:ListPicker  x:Name="prefix" VerticalAlignment="Center" HorizontalAlignment="Center" HorizontalContentAlignment="Center" SelectedIndex="1" Width="100" FontFamily="{StaticResource PhoneFontFamilyNormal}" Tag="{Binding title, Mode=TwoWay}" SelectionChanged="prefix_SelectionChanged">
                                                        <sys:String>Mr.</sys:String>
                                                        <sys:String>Ms.</sys:String>
                                                        <sys:String>Mrs.</sys:String>
                                                    </toolkit:ListPicker>
                                                </StackPanel>
                                            </Grid>
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="1*"/>
                                                    <ColumnDefinition Width="2*"/>
                                                    <ColumnDefinition Width="0.2*"/>
                                                </Grid.ColumnDefinitions>
                                                <TextBlock HorizontalAlignment="Left" Margin="0" TextWrapping="Wrap" Text="{Binding FirstName}" VerticalAlignment="Center" Foreground="White" d:LayoutOverrides="HorizontalAlignment"/>
                                                <TextBox Margin="0" Text="{Binding firstname, Mode=TwoWay}" TextWrapping="Wrap" VerticalAlignment="Center" Grid.Column="1" TextChanged="TextBox_TextChanged"/>
                                                <TextBlock HorizontalAlignment="Left" Margin="0" TextWrapping="Wrap" Text="*" VerticalAlignment="Center" Foreground="Red" Grid.Column="2" Visibility="{Binding firstnameIsEmpty}"/>
                                            </Grid>
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="1*"/>
                                                    <ColumnDefinition Width="2*"/>
                                                    <ColumnDefinition Width="0.2*"/>
                                                </Grid.ColumnDefinitions>
                                                <TextBlock TextWrapping="Wrap" Text="{Binding LastName}" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Left"/>
                                                <TextBox  Text="{Binding lastname, Mode=TwoWay}" TextWrapping="Wrap" VerticalAlignment="Center" Grid.Column="1" TextChanged="TextBox_TextChanged"/>
                                                <TextBlock HorizontalAlignment="Left" Margin="0" TextWrapping="Wrap" Text="*" VerticalAlignment="Center" Foreground="Red" Grid.Column="2" Visibility="{Binding lastnameIsEmpty}"/>
                                            </Grid>
                                        </StackPanel>
                                    </StackPanel>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>
                    </StackPanel>
                    <StackPanel DataContext="{Binding PassengerItem.contact}">
                    	<TextBlock Margin="0" TextWrapping="Wrap" Text="{Binding ContactInfo}" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Black"/>
                    	<Grid>
                    		<Grid.ColumnDefinitions>
                    			<ColumnDefinition Width="1*"/>
                    			<ColumnDefinition Width="2*"/>
                    			<ColumnDefinition Width="0.2*"/>
                    		</Grid.ColumnDefinitions>
                    		<TextBlock HorizontalAlignment="Left" Margin="0" TextWrapping="Wrap" Text="{Binding Country}" Foreground="White"/>
                    		<TextBox Text="{Binding country, Mode=TwoWay}" Margin="0" TextWrapping="Wrap" VerticalAlignment="Center" Grid.Column="1"/>
                    		<TextBlock HorizontalAlignment="Left" Margin="0" TextWrapping="Wrap" Text="*" VerticalAlignment="Center" Foreground="Red" Grid.Column="2" Visibility="{Binding countryIsEmpty}"/>
                    	</Grid>
                    	<Grid>
                    		<Grid.ColumnDefinitions>
                    			<ColumnDefinition Width="1*"/>
                    			<ColumnDefinition Width="2*"/>
                    			<ColumnDefinition Width="0.2*"/>
                    		</Grid.ColumnDefinitions>
                    		<TextBlock TextWrapping="Wrap" Text="{Binding Phone}" Foreground="White" Margin="0" HorizontalAlignment="Left"/>
                    		<TextBox Text="{Binding homephone, Mode=TwoWay}" Margin="0" TextWrapping="Wrap" VerticalAlignment="Center" Grid.Column="1" InputScope="TelephoneNumber"/>
                    		<TextBlock HorizontalAlignment="Left" Margin="0" TextWrapping="Wrap" Text="*" VerticalAlignment="Center" Foreground="Red" Grid.Column="2" Visibility="{Binding homephoneIsEmpty}"/>
                    	</Grid>
                    	<Grid>
                    		<Grid.ColumnDefinitions>
                    			<ColumnDefinition Width="1*"/>
                    			<ColumnDefinition Width="2*"/>
                    			<ColumnDefinition Width="0.2*"/>
                    		</Grid.ColumnDefinitions>
                    		<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding MobilePhone}" Foreground="White" Margin="0"/>
                    		<TextBox Text="{Binding mobile, Mode=TwoWay}" Margin="0" TextWrapping="Wrap" VerticalAlignment="Center" Grid.Column="1" InputScope="TelephoneNumber"/>
                    		<TextBlock HorizontalAlignment="Left" Margin="0" TextWrapping="Wrap" Text="*" VerticalAlignment="Center" Foreground="Red" Grid.Column="2" Visibility="{Binding mobileIsEmpty}"/>
                    	</Grid>
                    	<StackPanel>
                    		<TextBlock TextWrapping="Wrap" Text="{Binding PhoneNumberNotice}" HorizontalAlignment="Left" FontSize="29.333" Foreground="#FFE51B1B"/>
                    	</StackPanel>
                    	<Grid>
                    		<Grid.ColumnDefinitions>
                    			<ColumnDefinition Width="1*"/>
                    			<ColumnDefinition Width="2*"/>
                    			<ColumnDefinition Width="0.2*"/>
                    		</Grid.ColumnDefinitions>
                    		<TextBlock TextWrapping="Wrap" Text="{Binding Email}" Foreground="White" HorizontalAlignment="Left"/>
                    		<TextBox Text="{Binding email, Mode=TwoWay}" TextWrapping="Wrap" Grid.Column="1" InputScope="EmailSmtpAddress"/>
                    		<TextBlock HorizontalAlignment="Left" Margin="0" TextWrapping="Wrap" Text="*" VerticalAlignment="Center" Foreground="Red" Grid.Column="2" Visibility="{Binding emailIsEmpty}"/>
                    	</Grid>
                    </StackPanel>
                </StackPanel>
            </ScrollViewer>
		</Grid>
		
		<Grid Grid.Row="2">
			<local:AppBarMenuUserControl/>
		</Grid>
		
		<!--TitlePanel contains the name of the application and page title-->

		<!--ContentPanel - place additional content here-->
	</Grid>
</phone:PhoneApplicationPage>